import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 用户列表api接口集合
 */
export function useAgentApi() {
    return {
        // 获取代理列表页面数据
        getAgentListData: (params?: object) => {
            return request({
                url: '/lxs/saas/judicial/agent/get_agent_list_data',
                method: 'get',
                params,
            });
        },

        // 代理表单提交
        agentFormSubmit: (params?: object) => {
            return request({
                url: '/lxs/saas/judicial/agent/agent_form_submit',
                method: 'post',
                params,
            });
        },

        // 代理主体表单提交
        agentSoftwareSubmit: (params?: object) => {
            return request({
                url: '/lxs/saas/judicial/agent/agent_software_submit',
                method: 'post',
                params,
            });
        },

        // 代理充值表单提交
        agentRechargeSubmit: (params?: object) => {
            return request({
                url: '/lxs/saas/judicial/agent/agent_recharge_submit',
                method: 'post',
                params,
            });
        },

        // 获取代理充值列表页面数据
        getAgentRechargeListData: (params?: object) => {
            return request({
                url: '/lxs/saas/judicial/agent/get_agent_recharge_list_data',
                method: 'get',
                params,
            });
        },
    };
}
